//
//  REOperationView.m
//  录音
//
//  Created by ywy on 2016/12/27.
//  Copyright © 2016年 Wely. All rights reserved.
//

#import "REOperationView.h"

@implementation REOperationView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self == [super initWithFrame:frame]) {
        self.backgroundColor = halfOfAlpha;
        [self creatBaseView:frame];
    }
    return self;
}
-(void)creatBaseView:(CGRect)frame
{
    UIView * bigView  =[[UIView alloc] initWithFrame:CGRectMake(30, 90, REScreenW-60, REScreenH-160)];
//    bigView.center = self.center;
    bigView.layer.cornerRadius = 4;
    bigView.layer.masksToBounds  = YES;
    [self addSubview:bigView];
    self.deleteButton =  [UIButton buttonWithType:1];
    self.deleteButton.frame = CGRectMake(REScreenW-40, 64, 30, 30);
    [self.deleteButton setBackgroundImage:[UIImage imageNamed:@"fork"] forState:UIControlStateNormal];
    [self addSubview:self.deleteButton];
    UIImageView * headImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"header_background"]];
    headImage.frame = CGRectMake(0, 0, bigView.frame.size.width, 40);
    [bigView addSubview:headImage];
    self.webView  = [[UIWebView alloc] initWithFrame:CGRectMake(0, 40, bigView.frame.size.width, bigView.frame.size.height-40)];
    [bigView  addSubview:self.webView];
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, bigView.frame.size.width, 40)];
    self.titleLabel.text = @"操作说明";
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.textColor = [UIColor redColor];
    [bigView addSubview:self.titleLabel];
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
